package com.huluobo.a2107jetpackkotlindemo.room

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey

/**
 *  Created by LC on 2023/11/24.
 *  1.@Entity 标记一个实体类创建对应的数据库表
 *  2.@PrimaryKey(autoGenerate =true) 标记一个属性为主键自增
 *  3.@ColumnInfo(name = "_loginPassword")标记一个属性为列名(字段) name 代表重命名,如果不加,就以属性名作为列名
 */
@Entity(tableName = "Account")
data class AccountBean(
    @PrimaryKey(autoGenerate = true)
    var accountId: Int = 0,
    @ColumnInfo(name = "_loginAccount")
    var loginAccount: String,
    @ColumnInfo(name = "_loginPassword")
    var loginPassword: String,
    @ColumnInfo(name = "_loginIPAddress")
    var loginIPAddress: String,
    @ColumnInfo(name = "_sex")
    var sex: String,
    @ColumnInfo(name = "_loginAge")
    var loginAge: String
)